<template>
  <el-button type="" @click="download">下载模版</el-button>
</template>
<script>
export default {
  props: {
    url: {
      type: String,
      default: "",
    },
  },
  computed: {
    downloadUrl() {
      return process.env.VUE_APP_FILE_URL + this.url;
    },
  },
  data() {
    return {};
  },
  methods: {
    download() {
      const a = document.createElement("a");
      a.href = this.downloadUrl;
      a.click();
    },
  },
};
</script>
